package com.gitee.wsl.mathematics.interpolator.ext

import com.gitee.wsl.mathematics.interpolator.PercentOrRatio
import com.gitee.wsl.mathematics.vector.vec2.Vector2

//operator fun<N:Number> Vector2<N, *>.plus(other: Ratio) = create(x + other.width, y + other.height)
//operator fun<N:Number> Vector2<N, *>.minus(other: Ratio) = create(x - other.width, y - other.height)
operator fun<N:Number> Vector2<N, *>.times(other: PercentOrRatio) = create(x * other.value, y * other.value)
operator fun<N:Number> Vector2<N, *>.div(other: PercentOrRatio) = create(x / other.value, y / other.value)
//operator fun<N:Number> Vector2<N, *>.rem(other: Ratio) = create(x % other.width, y % other.height)

inline operator fun<N:Number> PercentOrRatio.times(that: Vector2<N, *>) = that * this